<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>充值记录</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="/zhenze/Public/home/css/reset.css"/>
		<link rel="stylesheet" href="/zhenze/Public/home/css/tixianjilu.css" />
		<link rel="stylesheet" href="/zhenze/Public/home/css/font-awesome.min.css" />
		<style>
			.btn00{line-height: 1.4rem;width: 16.75rem;margin: 1rem auto;border: none;background:#FF3C00;color: #FFFFFF;font-size:0.75rem;display: block;}
		</style>
	</head>
	<body>
		<div class="top">
			<a href="javascript:history.go(-1);"><i class="fa fa-angle-left"></i></a>
			<p>充值记录</p>
		</div>
		<ul id="datalist">
			<?php if(is_array($TopupList)): $i = 0; $__LIST__ = $TopupList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><li>
					<p><?php echo ($list["remark"]); ?><span><?php echo ($list["amount"]); ?>元</span></p>
					<p><?php echo (date("Y-m-d H:i:s",$list["time"])); ?><span></span><span><?php echo ($list["status"]); ?></span></p>
				</li><?php endforeach; endif; else: echo "" ;endif; ?>
		</ul>
		<button id="morebtn" onclick="getmore()" data="1" class="btn00">更多</button>
		<script type="text/javascript" src="/zhenze/Public/home/js/jquery-3.1.1.min.js" ></script>
		<script src="/zhenze/Public/home/js/screenSize.js" type="text/javascript" charset="utf-8"></script>
		<script>
			function getmore(){
				var page=parseInt($('#morebtn').attr("data"))+1;
				$.getJSON("<?php echo U('index/topuplist');?>&p="+page,function(result){
					$('#morebtn').attr("data",page);//重置当前页数
					var data=result.TopupList;
					console.log(data);
					if(data.length>0){
						var html="";
						for(var i=0;i<data.length;i++){
							html+='		<li>';
							html+='			<p>'+data[i].remark+'<span>'+data[i].amount+'元</span></p>';
							html+='			<p>'+data[i].time+'<span></span><span>'+data[i].status+'</span></p>';
							html+='		</li>';
						}
						$("#datalist").append(html);
					}else{
						$("#morebtn").html('亲，没有数据了！');
					}
				});
			}
		</script>
	</body>
</html>